Bug 568552 – gtk_combo + gtk entry in invisible mode takes 100% cpu
authorMatthias Clasen <matthiasc@src.gnome.org>
Wed, 21 Jan 2009 20:09:49 +0000 (20:09 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 21 Jan 2009 20:09:49 +0000 (20:09 +0000)
        * gtk/gtkentry.c: Fix an expose loop caused by raising windows out
        of an expose handler. Also, don't show the 'Caps Lock' warning for
        activated input methods, since that makes it permanently shown
        for some locales. It should not be that necessary, now that we
        do show preedit text even in password entries. Pointed out by
        Frederic Crozat.

svn path=/trunk/; revision=22164

ChangeLog
gtk/gtkentry.c

index 44e91fd95815008b8b3813f0df432cb7690370ab..cf0d72b8c7a79b864713c1f699dfa005583ca366 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-01-21  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 568552 – gtk_combo + gtk entry in invisible mode takes 100% cpu
+
+       * gtk/gtkentry.c: Fix an expose loop caused by raising windows out
+       of an expose handler. Also, don't show the 'Caps Lock' warning for
+       activated input methods, since that makes it permanently shown
+       for some locales. It should not be that necessary, now that we
+       do show preedit text even in password entries. Pointed out by
+       Frederic Crozat.
+
 2009-01-21  Federico Mena Quintero  <federico@novell.com>
 
        * gtk/gtkfilechooserdefault.c (save_widgets_create): Set
@@ -6,6 +17,7 @@
        exists.
 
 2009-01-21  Marek Kasik  <mkasik@redhat.com>
+
        Bug 561801 - "scheduled printing" doesn't function as expected
 
        * gtk/gtkprintunixdialog: Add tooltip.
index 6ed922332f7c31bdbb217948dbce746feee7e010..cda22297d35d92319f6ba442de8b3f0123d2db49 100644 (file)
@@ -799,8 +799,7 @@ gtk_entry_class_init (GtkEntryClass *class)
   /**
    * GtkEntry:caps-lock-warning
    *
-   * Whether password entries will show a warning when Caps Lock is on
-   * or an input method is active. 
+   * Whether password entries will show a warning when Caps Lock is on.
    *
    * Note that the warning is shown using a secondary icon, and thus
    * does not work if you are using the secondary icon position for some 
@@ -812,7 +811,7 @@ gtk_entry_class_init (GtkEntryClass *class)
                                    PROP_CAPS_LOCK_WARNING,
                                    g_param_spec_boolean ("caps-lock-warning",
                                                          P_("Caps Lock warning"),
-                                                         P_("Whether password entries will show a warning when Caps Lock is on or an input method is active"),
+                                                         P_("Whether password entries will show a warning when Caps Lock is on"),
                                                          TRUE,
                                                          GTK_PARAM_READWRITE));
 
@@ -2434,7 +2433,7 @@ update_cursors (GtkWidget *widget)
       if ((icon_info = priv->icons[i]) != NULL)
         {
           if (icon_info->pixbuf != NULL)
-            gdk_window_show (icon_info->window);
+            gdk_window_show_unraised (icon_info->window);
 
           /* The icon windows are not children of the visible entry window,
            * thus we can't just inherit the xterm cursor. Slight complication 
@@ -2515,7 +2514,7 @@ construct_icon_info (GtkWidget            *widget,
     realize_icon_info (widget, icon_pos);
 
   if (GTK_WIDGET_MAPPED (widget))
-    gdk_window_show (icon_info->window);
+    gdk_window_show_unraised (icon_info->window);
 
   return icon_info;
 }
@@ -6305,9 +6304,9 @@ gtk_entry_ensure_pixbuf (GtkEntry             *entry,
       g_assert_not_reached ();
       break;
     }
-
-  if (GDK_IS_WINDOW (icon_info->window))
-    gdk_window_show (icon_info->window);
+    
+  if (icon_info->pixbuf != NULL)
+    gdk_window_show_unraised (icon_info->window);
 }
 
 
@@ -9598,17 +9597,8 @@ keymap_state_changed (GdkKeymap *keymap,
 
   if (!entry->visible && priv->caps_lock_warning)
     { 
-      gboolean capslock_on;
-      gboolean im_on;
-
-      capslock_on = gdk_keymap_get_caps_lock_state (keymap);
-      im_on = g_strcmp0 (gtk_im_multicontext_get_context_id (GTK_IM_MULTICONTEXT (entry->im_context)), "gtk-im-context-simple") != 0;
-      if (capslock_on && im_on)
-        text = _("You have the Caps Lock key on\nand an active input method");
-      else if (capslock_on)
+      if (gdk_keymap_get_caps_lock_state (keymap))
         text = _("You have the Caps Lock key on");
-      else if (im_on)
-        text = _("You have an active input method");    
     }
 
   if (text)